package com.ruoyi.mayi.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * Api接口日志对象 t_api_log
 * 
 * @author mayi
 * @date 2022-02-12
 */
public class ApiLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 用户 */
    @Excel(name = "用户")
    private String user;

    /** 请求信息 */
    @Excel(name = "请求信息")
    private String request;

    /** 请求参数 */
    @Excel(name = "请求参数")
    private String paramater;

    /** 请求时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "请求时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date datetime;

    /** 响应信息 */
    @Excel(name = "响应信息")
    private String response;

    /** 执行时长 */
    @Excel(name = "执行时长")
    private String cost;

    /** 异常信息 */
    @Excel(name = "异常信息")
    private String error;

    /** 异常堆栈 */
    @Excel(name = "异常堆栈")
    private String errorstack;

    /** 操作结果（0:成功 1:失败） */
    @Excel(name = "操作结果", readConverterExp = "0=成功,1=失败")
    private String result;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUser(String user) 
    {
        this.user = user;
    }

    public String getUser() 
    {
        return user;
    }
    public void setRequest(String request) 
    {
        this.request = request;
    }

    public String getRequest() 
    {
        return request;
    }
    public void setParamater(String paramater) 
    {
        this.paramater = paramater;
    }

    public String getParamater() 
    {
        return paramater;
    }
    public void setDatetime(Date datetime) 
    {
        this.datetime = datetime;
    }

    public Date getDatetime() 
    {
        return datetime;
    }
    public void setResponse(String response) 
    {
        this.response = response;
    }

    public String getResponse() 
    {
        return response;
    }
    public void setCost(String cost) 
    {
        this.cost = cost;
    }

    public String getCost() 
    {
        return cost;
    }
    public void setError(String error) 
    {
        this.error = error;
    }

    public String getError() 
    {
        return error;
    }
    public void setErrorstack(String errorstack) 
    {
        this.errorstack = errorstack;
    }

    public String getErrorstack() 
    {
        return errorstack;
    }
    public void setResult(String result) 
    {
        this.result = result;
    }

    public String getResult() 
    {
        return result;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("user", getUser())
            .append("request", getRequest())
            .append("paramater", getParamater())
            .append("datetime", getDatetime())
            .append("response", getResponse())
            .append("cost", getCost())
            .append("error", getError())
            .append("errorstack", getErrorstack())
            .append("result", getResult())
            .append("createTime", getCreateTime())
            .toString();
    }
}
